package com.awaken.content.logic.dubbo;

import com.awaken.content.models.request.DemoRequest;
import com.awaken.content.models.dto.DemoDTO;
import com.awaken.content.service.app.DemoService;
import com.awaken.content.service.impl.DemoBusinessService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * Demo服务实现类
 *
 * @author bytearch
 */
@Slf4j
@Component
@RequiredArgsConstructor
public class DemoServiceImpl implements DemoService {

    private final DemoBusinessService demoBusinessService;

    @Override
    public DemoDTO processDemo(DemoRequest request) {
        log.info("接收到Demo请求: {}", request);
        return demoBusinessService.processDemo(request);
    }

    @Override
    public DemoDTO getDemoInfo(Long id) {
        log.info("接收到获取Demo信息请求: {}", id);
        return demoBusinessService.getDemoInfo(id);
    }

    @Override
    public String healthCheck() {
        log.info("健康检查");
        return demoBusinessService.healthCheck();
    }
}